<?php

use yii\helpers\Html;
use yii\grid\GridView;

/* @var $this yii\web\View */
/* @var $dataProvider yii\data\ActiveDataProvider */

$this->params['breadcrumbs'][] = $this->title;
$controller = '景区管理';
$action = '景区列表';
?>

<div class="page-header">
    <h1>
        <?php echo $controller;?>
        <small>
            <i class="ace-icon fa fa-angle-double-right"></i>
            <?php echo $action;?>
        </small>
    </h1>
</div>

<div class="scenic-role-index">


    <p>
        <?= Html::a('添加景区', ['create'], ['class' => 'btn btn-success']) ?>
    </p>

    <?= GridView::widget([
        'dataProvider' => $dataProvider,
        'columns' => [
            'id',
            'scenic_name',
            'scenic_ticket',
            'ratio'=>[
                'label' => '抽成比例(%)',
                'value' => function($data){
                    return $data->ratio*100;
                }
            ],
            'rake',
            [
                'class' => 'yii\grid\ActionColumn',
                'header' => ' 操作',

            ],
        ],
    ]); ?>

</div>
